const { defineConfig } = require('@vue/cli-service')
const WebpackCodeInspectorPlugin = require('webpack-code-inspector-plugin');

module.exports = defineConfig({
  transpileDependencies: true,
  css: {
    loaderOptions: {
      sass: {
        // sass 版本 9 中使用 additionalData 版本 8 中使用 prependData 旧版本中使用 data
        additionalData: `@import "@/assets/common/color_size.scss";
          @import "@/assets/common/mixin.scss";`
      }
    }
  },
  chainWebpack: (config) => {
    // add this configuration in the development environment
    config
      .plugin('webpack-code-inspector-plugin')
      .use(new WebpackCodeInspectorPlugin({
        showSwitch: true,
      }));
  },
})